package com.hucc.redislock;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;

public class RedisLockContext {
    private static JedisPool jedisPool;

    public static Jedis getJedis() {

        return jedisPool.getResource();
    }

    public static RedisCommandExecutor getRedisCommandExecutor() {

        return RedisCommandExecutor.getInstance();
    }

    public static RedisLockConfig getRedisLockConfig() {

        return RedisLockConfig.getInstacne();
    }

    public static void setJedisPool(JedisPool jedisPool) {
        RedisLockContext.jedisPool = jedisPool;
    }
}
